home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp48hor1 / io.doc < prev    next >
Text File  |  1995-03-31  |  2KB  |  45 lines

  1. IO: Collection of memory access utilities, by various authors. 
  2. Note: Some of these memory i/o utilities contain "Code" (machine language 
  3. routines) or other unlistable objects, so the following "source code" listing 
  4. is merely for completeness' sake. 
  5.  
  6. %%HP: T(3); 
  7. DIR 
  8.   SYSRCL @ recalls system object at given hex address. 
  9.     \<< # 4003h SYSEVAL # 56B6h SYSEVAL DROP 
  10.     \>> 
  11.   ADDR @ yields hex address of { obj }. 
  12.     \<< 1 GET # 0h NEWOB Code SWAP DROP 
  13.     \>> 
  14.   PEEK @ gives 16 hex nibs (backwards) starting at given hex address. 
  15.     \<< B\->R R\->B Code 
  16.     \>> 
  17.   REV @ reverses string object. 
  18.     \<< DUP NUM DROP NEWOB Code 
  19.     \>> 
  20.   \->ASC @ Wickes' object-to-hexdump+checksum; poor man's disassembler. 
  21.     [ not listable ] 
  22.   ASC\-> @ Inverse of ->ASC. 
  23.     [ not listable ] 
  24.   FRE @ like MEM but doesn't force a garbage collection. 
  25.     [ not listable ] 
  26.   POKE @ ? unsure usage. 
  27.     \<< SWAP OVER # 0h AND OR SWAP Code 
  28.     \>> 
  29.   MACF @ ? unsure. 
  30.     Code 
  31.   \->SYS @ convert list of hex integers into system object. 
  32.     \<< "" + LIST\-> 2 SWAP 
  33.       START # 5193h SYSEVAL 
  34.       NEXT # 4003h SYSEVAL # 56B6h SYSEVAL DROP 
  35.     \>> 
  36.   STR\->OBJ @ convert string of hex digits into system object; poor man's 
  37.             @ assembler. 
  38.     \<< RCLF SWAP 64 STWS \-> s 
  39.       \<< "" 1 s SIZE 
  40.         FOR x "#" s x DUP 1 + SUB REV + "h" + OBJ\-> B\->R CHR + 2 
  41.         STEP 
  42.       \>> 'obj' STO obj SYSRCL NEWOB SWAP STOF 
  43.     \>> 
  44. END 
  45.